package bot.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.imageio.ImageIO;
import java.awt.*;
import java.awt.geom.AffineTransform;
import java.awt.image.BufferedImage;
import java.io.*;
import java.util.HashMap;
import java.util.Map;
import java.util.Random;
import java.util.UUID;

@RestController
@RequestMapping("/get")
public class GetPixiv {
    @GetMapping("/pixiv")
    public Object pixiv() throws IOException {
//        String s = HttpHelp.sendGet("image.anosu.top/pixiv/direct?r18=1&keyword=");
//        URL url = new URL("https://image.anosu.top/pixiv/direct?r18=1&keyword=");
//        DataInputStream dataInputStream = new DataInputStream(url.openStream());
//
//        FileOutputStream fileOutputStream = new FileOutputStream(new File(ImageName));
//        ByteArrayOutputStream output = new ByteArrayOutputStream();
//        byte[] buffer = new byte[1024];
//        int length;
//        while ((length = dataInputStream.read(buffer)) > 0) {
//            output.write(buffer, 0, length);
//        }
//        MultipartFile multipartFile = JSONObject.parseObject(s, MultipartFile.class);
//        return multipartFile;
        return null;
    }


}
